package com.dx.springbootwebservice;

import com.dx.springbootwebservice.ws.GetCountryResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: dx
 * @date: 2019/3/26/0026
 * @description:
 */
@RestController
public class IndexController {
	@Autowired
	private WsClient wsClient;
	@RequestMapping("/callws")
	public Object callWs() {
		GetCountryResponse response = wsClient.getCountry("hello-world");
		return response.getCountry();
	}
}